package com.ihr360.payroll.model.dto.attendance.supperclass;


import com.ihr360.commons.model.IEnabledEntity;
import com.ihr360.shared.entitywithlistener.NumberIdWithTimeAndCompanyId;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

@Data
@MappedSuperclass
public class AbstractAttendanceRule extends NumberIdWithTimeAndCompanyId<Long> implements IEnabledEntity {

    /**
     * 规则名称
     */
    // TODO 产品设计已经不对这个字段维护了
   /* @Column(nullable = false, length = 50)
    @NaturalId(mutable = true)
    private String name;*/

    /**
     * 备注
     */
    @Column(length = 1000)
    private String remark;

    /**
     * 是否启用
     */
    private boolean enabled = true;

    public AbstractAttendanceRule() {
    }

    @Override
    public boolean isEnabled() {
        return enabled;
    }

    @Override
    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }
}